﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Calculalouca
{
    public class Opening : Scene
    {
        float timeRemaining = 0.5f;

        Background classBackground;

        public Opening(Game game)
            : base(game)
        {
            classBackground = new Background(game.Content.Load<Texture2D>("Bg_Opening"), Color.White);
        }

        public override void Update(GameTime gameTime)
        {
            if (timeRemaining == 0)
            {
                SceneManager.ChangeScene(Game);
            }

            timeRemaining = MathHelper.Max(0, timeRemaining - (float)gameTime.ElapsedGameTime.TotalSeconds);

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            classBackground.Draw(gameTime, spriteBatch);

            base.Draw(gameTime);
        }

    }
}
